package com.example.admin.mybledemo.ota;

public class OtaBlock {
    public int address;
    public byte[] data;
    public byte[] fcs;

    public OtaBlock(int address, byte[] data) {
        this.address = address;
        this.data = data;
        this.fcs = calculateFcs(data);
    }

    private byte[] calculateFcs(byte[] data) {
        // 使用标准的FCS算法（与Flutter端保持一致）
        return FcsUtil.calculateFCS(data);
    }
}
